﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Reflection;

namespace RestaurantBooker.Helpers
{
    public sealed class VersionHelper
    {
        private static String m_version;

        public static String Version
        {
            get
            {
                if (m_version == null)
                {
                    Assembly assembly = Assembly.GetExecutingAssembly();
                    if (assembly.FullName != null)
                    {
                        string[] parts = assembly.FullName.Split(',');
                        m_version = parts[1];
                        parts = m_version.Split('=');
                        m_version = parts[1];
                    }
                }
                return m_version;
            }
        }
    }
}
